<?php
	$pathToRoot = "../";
    $title = "Avslutade Uppdrag";
	
    // --------------------------------------------------------------
	require_once $pathToRoot . "Common/Database.php";
    require_once $pathToRoot . "Common/DBConfig.php";
    require_once $pathToRoot . "Common/User.php";

    require_once $pathToRoot . "Model/LoginHandler.php";
    
    require_once $pathToRoot . "View/LoginActionView.php";
    
    require_once $pathToRoot . "Controller/LoginPagesController.php";
    // ---------------------------------------------------------------

    // Startar en ny session.
    session_start();
    
    // Skapar objekt.
    $dbConfig = new DBConfig();
    $database = new Database($dbConfig);
    $loginHandler = new LoginHandler($database);
    $loginPagesController = new LoginPagesController($loginHandler, $database);
    
    // Sätter $currentPage till rätt konstant och skickar med den till Do Login Pages Controll som ligger i Login Pages Controller.
    $currentPage = LoginActionView::COMPLETED_ASSIGNMENT;
    $content = $loginPagesController->DoLoginPagesControll($currentPage);
    $database->CloseConnection();
?>

<?php include($pathToRoot . "Common/Head.php");?>        
<body>    
    <div id="wrapper">    
        <?php include($pathToRoot . "Common/Menu.php");?>         
        <div id="container">
            <div id="content">
              	<?php echo $content; ?>          
            </div>           
        </div>
        <?php include($pathToRoot . "Common/Footer.php");?>